Skip to content

Instantly share code, notes, and snippets.

@dougdonohoe
dougdonohoe / jupyter_version_info.md
Last active October 1, 2026 00:50
Determine Python version and package versions from within a Jupyter notebook

Jupyter Notebook Version Info

When I am using an online Jupyter notebooks (e.g., DeepLearning.AI, Colab, Kaggle, etc.), I usually prefer to be able to reproduce it locally. I want this mainly so I can easily take snippets of Python code and incorporate them into a proper script or application outside of a notebook.

The hard part is knowing the proper version of Python and all the packages that the notebook uses. When using an online notebook, this isn't always obvious. Python, is infamous for its ability to

@suveshmoza
suveshmoza / better-nova.css
Created June 20, 2026 18:36
Better Nova — Firefox Nova without rounded corners and borders
@media -moz-pref('browser.nova.enabled') {
:root {
--chrome-content-separator-color: unset !important;
--chrome-window-gap: 0px !important;
}
#browser {
padding: 0 !important;
border-radius: 0 !important;
}
@cuonggt
cuonggt / markdown_guide.md
Last active October 1, 2026 00:44
The Ultimate Guide to Markdown

Markdown Guide

The Ultimate Guide to Markdown

Basic Markdown Formatting

Headings

# This is an <h1> tag

This is an tag

@wavezhang
wavezhang / java_download.sh
Last active October 1, 2026 00:43
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@whatyouhide
whatyouhide / testing_defps.ex
Created January 7, 2016 22:26
Testing private functions in Elixir
defmodule TestDefp do
defmacro __using__(_) do
quote do
import Kernel, except: [defp: 2]
end
end
# Let's redefine `defp/2` so that if MIX_ENV is `test`, the function will be
# defined with `def/2` instead of `defp/2`.
defmacro defp(fun, body) do
@samhenrigold
samhenrigold / 001_NEW27_task_overview.txt
Last active October 1, 2026 00:29
iOS 27 system prompts
# Owning binary : TextComposerRuntime
# Status : NEW in iOS 27 (not in 26.5.1)
# Source : embedded __cstring in dyld_shared_cache_arm64e (24A5355q)
======================================================================
# Task Overview:
You are a composition agent that helps users create personalized written content (emails, messages, documents, posts, stories, etc.)
As an Assistant, you must:
1. Analyze the request to determine if you have sufficient information
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@krishna1m
krishna1m / autoexec.cfg
Last active September 30, 2026 23:58
autoexec
"rate" "1000000"
alias +teamid "cl_teamid_overhead_fade_near_crosshair 0;cl_teamid_overhead_mode 3;+use;+voicerecord"
alias -teamid "cl_teamid_overhead_fade_near_crosshair 1;cl_teamid_overhead_mode 1;-use;-voicerecord"
bind "alt" "+teamid"
// radar
"cl_hud_color" "1"
"cl_hud_radar_scale" "1"
"cl_radar_always_centered" "true"
@nxfx21
nxfx21 / Reset CrossOver Trial.md
Last active September 30, 2026 23:52
Resets the CrossOver Trial. This script is only intended for educational purposes. This script is ONLY for macOS. THIS SCRIPT IS NOT FOR PIRACY.

Read this first!

This is important!

Note

Ensure CrossOver.app is installed in your /Applications folder and has been opened at least once before using this script.

Tested on macOS 14+, from CrossOver 22.0.0 onwards, on both Apple Silicon and Intel Macs.


1. Download the script

@HyBoxwood
HyBoxwood / draw.py
Last active October 1, 2026 00:25
GB 16689 | Regional flag of Hong Kong special administrative region
import math
# ============================================================
# Geometry utilities
# ============================================================
def circle_circle_intersection(c1, r1, c2, r2):
"""Return the intersection points of two circles."""
dx = c2[0] - c1[0]; dy = c2[1] - c1[1]
d = math.hypot(dx, dy)
if d > r1 + r2 or d < abs(r1 - r2) or d == 0: